package com.jdk.demo.objectOutputStream;

import java.io.Serializable;

public class User implements Serializable {

    //可以用eclipse生成, 也可以随意指定一个非0的值
    private static final long serialVersionUID = 1L;

    public final int sex;//性别0-女 1-男
    public final String name;//姓名
    public String phoneNum;//手机号

    public User(String name,int sex){
        this.name = name;
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public int getSex() {
        return sex;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

	@Override
	public String toString() {
		return "User [sex=" + sex + ", name=" + name + ", phoneNum=" + phoneNum + "]";
	}

}
